import java.util.Arrays;

/*
* 二维数组
* 1.可以省略列 不能省略行
* */
public class Test4 {
    public static void main(String[] args) {
        int[][] array = new int[][]{{1,2,3},{4,5,6}};
        for (int i = 0; i < array.length; i++) {
            for (int j = 0; j <array[0].length ; j++) {
                System.out.print(array[i][j] + " ");
            }
            System.out.println();
        }
        for (int[] x:array
             ) {
            for (int tmp:x
                 ) {
                System.out.print(tmp + " ");
            }
            System.out.println();
        }
        System.out.println(Arrays.deepToString(array));//打印二维数组

    }
}
